﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using MyLib;
using Workflow.Entity;
using System.Collections;

namespace Workflow.Interface
{
    public interface ITask
    {
        List<TaskEntity> GetMyTask(string filter, Hashtable paras, string sort, int skipResults, int maxResults);
        int GetMyTaskCount(string filter, Hashtable paras);

        List<TaskEntity> GetMyApproval(string filter, Hashtable paras, string sort, int skipResults, int maxResults);
        int GetMyApprovalCount(string filter, Hashtable paras);

        List<TaskEntity> GetMyRequest(string filter, Hashtable paras, string sort, int skipResults, int maxResults);
        int GetMyRequestCount(string filter, Hashtable paras);

        TaskEntity GetEntity(string taskID);

        string GetTaskUrl(string taskID, string type, string userName);

        List<ProcessEntity> GetInitProcessList(string userName);

        string SubmitTask(string userName, string taskId, string summary, Hashtable vars, bool sync, ref int incident);

        string ReturnTask(string userName, string taskId, string reason, string summary, Hashtable vars, bool sync);

        string RejectTask(string userName, string taskId, string reason, Hashtable vars, bool sync);

        bool AbortIncident(string taskId, out string strError);

        string GetCurrentUser(string strProcess, int incident);

        string GetTaskId(string processName, int incdient);

        string GetTaskId(string processName, int incdient,string userName);

        List<TaskEntity> GetStepStatus(string processName, int incdient);

        byte[] GetGraphicalStatus(string processName, int incdient);

        int GetStepType(string stepID);

        bool AssignTask(string taskId, string toUser);

        bool AssignAllCurrentTasks(string fromUser,string toUser);

        bool AssignAllFutureTasks(string fromUser,string toUser,DateTime toDate);
    }
}
